package com.tao.YanMoDesignPattern.Mediator.case1_mainbox;


/**
 * @Author Mi_Tao
 * @Date 2023/7/23
 * @Description 光驱
 * @Version 1.0
 **/
public class CPU extends Colleague {


    public CPU(Mediator mediator) {
        super(mediator);
    }

    // 分解出来的视频数据
    private String videoDate = "";
    // 分解出来的声音数据
    private String soudDate = "";

    public void executeData(String data){
        String[] ss = data.split(",");
        this.videoDate = ss[0];
        this.soudDate = ss[1];
        // 通知主板，cpu 任务完成
        this.getMediator().changed(this);
    }

    public String getVideoDate() {
        return videoDate;
    }

    public String getSoudDate() {
        return soudDate;
    }
}
